﻿create table dbo.RoleColumns (
   ColumnRoleId         nvarchar(10)         collate Chinese_PRC_CI_AS not null,
   RoleId               nvarchar(10)         collate Chinese_PRC_CI_AS null,
   FunctionId           nvarchar(10)         collate Chinese_PRC_CI_AS null,
   RoleType             nvarchar(50)         collate Chinese_PRC_CI_AS null,
   FieldName            nvarchar(50)         collate Chinese_PRC_CI_AS null,
   constraint PK_RoleColumns primary key (ColumnRoleId)
         on "PRIMARY"
)
on "PRIMARY"
go

execute sp_addextendedproperty 'MS_Description', 
   '角色列权限ID',
   'user', 'dbo', 'table', 'RoleColumns', 'column', 'ColumnRoleId'
go

execute sp_addextendedproperty 'MS_Description', 
   '角色ID',
   'user', 'dbo', 'table', 'RoleColumns', 'column', 'RoleId'
go

execute sp_addextendedproperty 'MS_Description', 
   '功能ID',
   'user', 'dbo', 'table', 'RoleColumns', 'column', 'FunctionId'
go

execute sp_addextendedproperty 'MS_Description', 
   '权限类型',
   'user', 'dbo', 'table', 'RoleColumns', 'column', 'RoleType'
go

execute sp_addextendedproperty 'MS_Description', 
   '字段名称',
   'user', 'dbo', 'table', 'RoleColumns', 'column', 'FieldName'
go